package pub.wkq.springframework.test.bean;

import java.util.HashMap;
import java.util.Map;

public class UserDao {
    private static Map<String, String> hashMap = new HashMap<>();

    public void initDataMethod(){
        System.out.println("执行了初始化方法");
        hashMap.put("10001", "王开琦");
        hashMap.put("10002", "赵冰冰");
        hashMap.put("10003", "张三");
    }
    public void destroyDataMethod(){
        System.out.println("执行了销毁方法");
        hashMap.clear();
    }
    public String queryUserName(String uId) {
        return hashMap.get(uId);
    }
}
